import request from '@/utils/request'

// 币种列表（分页）
export function currencyPageList(query) {
  return request({
    url: '/system/interlace/currencyChain/currency/pageList',
    method: 'get',
    loading: true,
    params: query
  })
}

// 币种详情
export function getCurrencyDetail(id) {
  return request({
    url: '/system/interlace/currencyChain/currency/' + id,
    method: 'get',
    loading: true
  })
}

// 新增币种
export function addCurrency(data) {
  return request({
    url: '/system/interlace/currencyChain/currency',
    method: 'post',
    loading: true,
    data: data
  })
}

// 修改币种
export function editCurrency(data) {
  return request({
    url: '/system/interlace/currencyChain/currency',
    method: 'put',
    loading: true,
    data: data
  })
}

// 删除币种
export function removeCurrency(id) {
  return request({
    url: '/system/interlace/currencyChain/currency/' + id,
    method: 'delete',
    loading: true
  })
}

// 获取币种选择列表
export function currencyOptionList() {
  return request({
    url: '/system/interlace/currencyChain/currency/optionList',
    method: 'get',
    loading: true
  })
}

// 链列表（分页）
export function chainPageList(query) {
  return request({
    url: '/system/interlace/currencyChain/chain/pageList',
    method: 'get',
    loading: true,
    params: query
  })
}

// 链详情
export function getChainDetail(id) {
  return request({
    url: '/system/interlace/currencyChain/chain/' + id,
    method: 'get',
    loading: true
  })
}

// 新增链
export function addChain(data) {
  return request({
    url: '/system/interlace/currencyChain/chain',
    method: 'post',
    loading: true,
    data: data
  })
}

// 修改币种
export function editChain(data) {
  return request({
    url: '/system/interlace/currencyChain/chain',
    method: 'put',
    loading: true,
    data: data
  })
}

// 删除链
export function removeChain(id) {
  return request({
    url: '/system/interlace/currencyChain/chain/' + id,
    method: 'delete',
    loading: true
  })
}

// 链选择列表
export function chainOptionList() {
  return request({
    url: '/system/interlace/currencyChain/chain/optionList',
    method: 'get',
    loading: true
  })
}
